package com.plusjun.search.vo;

import com.plusjun.common.to.es.SkuEsModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SearchResultVO {
    private List<SkuEsModel> products;
    private Integer pageNum; // 当前页码
    private Long total; // 总记录数
    private Integer totalPages; // 总页码
    private List<Integer> pageNavs;// 导航页数组

    private List<BrandVO> brands; // 当前查询到的所有涉及到的结果

    private List<CatalogVO> catalogs; // 当前查询到的所有涉及到的结果的所有分类
    private List<AttrVO> attrs;// 当前查询到的所有涉及到的结果的所有属性

    /**
     * 面包屑导航
     */
    private List<NavVo> navs = new ArrayList<>();
    private List<Long> attrIds = new ArrayList<>();
    //====================以上是返回页面的VO========================//
    @Data
    public static class NavVo{
        private String navName;
        private String navValue;
        private String link;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class BrandVO {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class AttrVO {
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class CatalogVO {
        private Long catalogId;
        private String catalogName;
    }
}
